Xbasic
Object Pointer data Method
Syntax
dim value as A = obj.data(propertyName as C)
Arguments
- propertyNameCharacter
The name of the property.
Returns
- valueAny Type
Returns the value of the property, if it exists. If the object pointer doesn't have the property, returns an empty string.
Description
Returns the value of the property, if it exists.
Discussion
The data() method returns the value for a property in an object pointer. The property to retrieve the value for is passed as the propertyName argument. If the property doesn't exist, data() returns an empty string. Otherwise, the value of the property is returned.
Example
dim obj as p
obj.first = 1
obj.second = 2
obj.third = 3
obj.fourth = 4
dim props as c = properties_enum(obj,"!F")
dim nums[0] as N
for each prop in props
nums.push(obj.data(prop.value))
next
? nums
= [1] = 1
[2] = 2
[3] = 3
[4] = 4See Also